package org.example.feignClient;

import org.example.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("user-server")
public interface UserFeignClient {

    @GetMapping(value = "/user/{id}")
    User getUserById(@PathVariable("id") Long id);

    @PostMapping("/user/add")
    User addUser(@RequestBody User user);
}